package com.zm.demo.sc.mybatisplus.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zoum
 * @since 2021-07-02
 */
@Data
  @EqualsAndHashCode(callSuper = false)
    @TableName("${schemaName}t_user")
public class TUser implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId("id")
      private Integer id;

      /**
     * 姓名
     */
      @TableField("name")
    private String name;

      /**
     * 手机号码
     */
      @TableField("mobile_phone")
    private String mobilePhone;

      /**
     * 性别
     */
      @TableField("gender")
    private Integer gender;

      /**
     * 创建时间
     */
      @TableField("create_time")
    private LocalDateTime createTime;

      /**
     * 更新时间
     */
      @TableField("update_time")
    private LocalDateTime updateTime;


public enum TUserEnum {
        id,
        name,
        mobile_phone,
        gender,
        create_time,
        update_time,
      ;

        public static String allColumns(){
            StringBuilder sb = new StringBuilder();
                TUserEnum []enums = TUserEnum.values();
            for (int i = 0; i < enums.length ; i++) {
                if (sb.length() > 0) {
                    sb.append(",");
                }
                sb.append(enums[i]);
            }
            return sb.toString();
        }
    }
}
